﻿
{$header}<div id="main" class="main" >
    <div class="content">
  <h3 class="heading">编辑库存记录 [ <a href="__URL__">返回列表</a> ]</h3>
<div id="result" class="result none"></div>
<form class="form-horizontal well" method='post' id="form1" action="__URL__/update/">
<table cellpadding=3 cellspacing=3 >
<tr>
	<td class="tRight" >产品：</td>
	<td class="tLeft" > <input type="hidden" name="product_id" value="{$vo.product_id}">
    <a href="__APP__/Product/edit/id/{$vo.product_id}">{$vo.product_id|getModelName=Product} </a> [编号：{$vo.product_id}]
  </td>
</tr>
<tr>
	<td class="tRight" >条码：</td>
	<td class="tLeft" >{$vo.product_id|getModelName=Product,tm} </td>
</tr>
<tr>
	<td class="tRight" >数量：</td>
	<td class="tLeft" >
            <input type="text" name="number" value="{$vo.number}" class="small">
        </td>
</tr>
<tr>
	<td class="tRight" >仓库：</td>
	<td class="tLeft" >
            <select name="warehouse_id">
                <volist name="warehouses" id="ue">
                    <option value="{$key}" <eq name="vo.warehouse_id" value="$key">selected</eq> >{$ue}</option>
                </volist>
            </select>
        </td>
</tr>
<tr>
	<td></td>
	<td class="center" width="300">
        <input type="hidden" value="{$vo.id}" name="id">
	<button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> 保存</button>
	<button type="reset" onclick="javascript:history.back()" class="btn btn-primary offset1"><i class="icon-arrow-left icon-white"></i> 返回</button>
	</td>
</tr>
</table>
</form>

<ul id="myTab" class="nav nav-tabs">
            <li class="active"><a href="#home" data-toggle="tab">入库历史</a></li>
            <li><a href="#profile" data-toggle="tab">出库历史</a></li>
          
          </ul>
          <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade in active" id="home">
              <p class="alert-info">每个类型暂取前20条记录</p>
              <table class="table table-bordered table-striped">
                <tr><th>操作</th> <th>单号</th><th>数量</th><th>客/商</th><th>时间</th> </tr>
                <volist name="enters" id="eo">
                  <tr>
                  <td>入库</td><td>{$eo.enter_no}</td><td>{$eo.number}</td><td>{$eo.supplier_id|getModelName='Supplier'}</td><td>{$eo.create_time|toDate}</td> 
                  </tr>
                </volist>
                <volist name="sale_backs" id="so">
                  <tr>
                  <td>销售退货</td><td>{$so.sale_back_no}</td><td>{$so.number}</td><td>{$so.customer_id|getModelName='Customer'}</td><td>{$so.create_time|toDate}</td> 
                  </tr>
                </volist>
                <volist name="switch_ins" id="sw">
                  <tr>
                  <td>仓库调拨货</td><td>{$sw.switch_no}</td><td>{$sw.number}</td><td>{$sw.user_id|getModelName='User'}</td><td>{$sw.create_time|toDate}</td> 
                  </tr>
                </volist>
              </table>
            </div>
            <div class="tab-pane fade" id="profile">
              <p class="alert-info">每个类型暂取前20条记录</p>
              <table class="table table-bordered table-striped">
                <tr><th>操作</th> <th>单号</th><th>数量</th><th>客/商</th><th>时间</th> </tr>
                <volist name="back_suppliers" id="ba">
                  <tr>
                  <td>退货供应商</td><td>{$ba.enter_no}</td><td>{$ba.number}</td><td>{$ba.supplier_id|getModelName='Supplier'}</td><td>{$ba.create_time|toDate}</td> 
                  </tr>
                </volist>
                <volist name="sales" id="sa">
                  <tr>
                  <td>销售</td><td>{$sa.sale_no}</td><td>{$sa.number}</td><td>{$sa.customer_id|getModelName='Customer'}</td><td>{$sa.create_time|toDate}</td> 
                  </tr>
                </volist>
                <volist name="switch_outs" id="su">
                  <tr>
                  <td>仓库调拨货</td><td>{$su.switch_no}</td><td>{$su.number}</td><td>{$su.user_id|getModelName='User'}</td><td>{$su.create_time|toDate}</td> 
                  </tr>
                </volist>
                <volist name="brokens" id="bk">
                  <tr>
                  <td>报废</td><td>{$bk.broken_no}</td><td>{$bk.number}</td><td>{$bk.user_id|getModelName='User'}</td><td>{$bk.create_time|toDate}</td> 
                  </tr>
                </volist>
              </table>
            </div>
        </div>

</div>
</div>
<include file="Public:footer" />
<load href="__PUBLIC__/Js/jquery-1.7.2.min.js"/>
<load href="__PUBLIC__/bootstrap/js/bootstrap-tab.js" />
<script>
</script>
